package Java测试.编码6;

import java.util.Scanner;

//6 试编写程序，从一个给定的字符串中删去某一个给定的字符。
public class Testcopy {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个字符串:");
        String s = scanner.next();
        System.out.println("请输入要删除的的字符");
        String s1 = scanner.next();
        String replace = s.replace(s1, "");//替换字符串中的字符为空("")
        System.out.println(replace);
    }
}
